﻿<%@ Import Namespace="Model.WWW_WWW.translate" %>
<%@ Control Language="C#" AutoEventWireup="true" Inherits="Web.Control.WWW.translate.translate" %>
<div style="width: 100%; text-align: center">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
				<div class="submenu3"></div>
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle">
								<h1>Translate</h1>
								<div class="copyright"><a href="/translate">Translate</a> > <%= LangName %></div>
							</div>
							<div class="submenuN_button" style="top:30"></div>
						</div>
					</div>
				</div>
				<% if (SingleTranslate != null) {%>
				<div class="Center9001n">
					<div class="center9001right">
						<div class="Center9001Content">
							<div class="translate_area">
								<div>
									<div class="translate_site">
										<h3>English entry or phrase:</h3><div class="translate_original"><%= HighLightCode(SingleTranslate.ItemText) %></h3></div>
										<p align="right"><% if (CurrentMember != null && CurrentMember.IsAdmin) {%><a href="javascript:;" onclick="javascript:if(confirm('are you sure delete this item?')) window.location.href='/translate/translate.htm?lang=<%= Request.QueryString["lang"] %>&delete=<%= SingleTranslate.ItemNo %>';">delete</a><%}%>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/translate/translate.htm?lang=<%=Request.QueryString["lang"]%>">Get a new entry</a></p>
									</div>
									<p class="black18">Translate to <%=LangName%>:</p>
									<div class="translate_select">
										<!--loop start-->
										<% foreach (TranslateModel tm in SingleTranslateModels) {%>
										<table width="625" border="0" cellspacing="0" cellpadding="0" class="translate_selectList" <% if(tm.GoodFlag){%>style="background-color:#fef8fc"<%}%>>
											<tr>
												<td width="60"><div class="pic50"><a class="photo_50" href="/<%= tm.MemberNo %>.htm"><img alt="" src='<%= string.IsNullOrEmpty(tm.Avatar) ? "/Images/no_pic.gif" : tm.Avatar %>' border="0"></a></div></td>
												<td width="140"><a href="/<%= tm.MemberNo %>.htm"><%= tm.NickName %></a><br><span class="grey12"><%= tm.CreateDate %></span></td>
												<td width="370" <% if(tm.GoodFlag){%> style=" font-size:14px; font-weight:bold" <%}%>><% if(tm.GoodFlag){%><img src="/Images/icon_accept.gif" align="absmiddle" /> <%}%><%= HighLightCode(tm.ItemText) %></td>
												<td width="60" align="center" id="td_feedback_<%= tm.ContentID %>">
													<%if (CurrentMember != null && CurrentMember.IsAdmin) { %><a href="?lang=<%= Request.QueryString["lang"] %>&good=<%= tm.ContentID%>&id=<%= tm.ItemNo %>">make the best</a><%} %>
													<div class="trans_rate" id="div_feedback_<%= tm.ContentID %>"><%= tm.Feedback %></div>
													<%if (tm.MemberNo != HttpContext.Current.User.Identity.Name && !HasGoodFlag) {%>
													<div class="floatr" id="div_subfeedback_<%=tm.ContentID%>"><a href="javascript:;" onclick="javascript:$('div_subfeedback_<%=tm.ContentID%>').style.visibility='hidden';AddFeedback(<%=tm.ContentID%>,<%=tm.Feedback - 1%>,'<%=HttpContext.Current.User.Identity.Name%>');"><img src="/Images/comment_thumbs_down_neutral.png" onclick="" alt="" border="0" /></a></div>
													<div class="floatl" id="div_addfeedback_<%=tm.ContentID%>"><a href="javascript:;" onclick="javascript:$('div_addfeedback_<%=tm.ContentID%>').style.visibility='hidden';AddFeedback(<%=tm.ContentID%>,<%=tm.Feedback + 1%>,'<%=HttpContext.Current.User.Identity.Name%>');"><img src="/Images/comment_thumbs_up_neutral.png" onclick="" alt="" border="0" /></a></div>
													<%
													}%>
												</td>
											</tr>
										</table>
										<%} %>
									</div>
									<div id="divPage">
										<%=CreatePageNav(ContentCount, PageSize, PageIndex, "",
										string.Format("<span class='page_none grey10'><a href='{0}/translate/translate.htm?lang={1}&id={2}&p=$I$'>{3}</a></span>&nbsp;", WWWHost,Request.QueryString["lang"], SingleTranslate.ItemNo, HttpUtility.UrlEncode(GetText("Prev"))),
										"",string.Format("<span class='page_none grey10'><a href='{0}/translate/translate.htm?lang={1}&id={2}&p=$I$'>{3}</a></span>&nbsp;",WWWHost, Request.QueryString["lang"], SingleTranslate.ItemNo,  HttpUtility.UrlEncode(GetText("Next"))),
										string.Format("<span class='page_select'>{0}</span>&nbsp;", PageIndex),
										string.Format("<span class='page_none grey10'><a href='{0}/translate/translate.htm?lang={1}&id={2}&p=$I$'>$I$</a></span>&nbsp;",WWWHost,Request.QueryString["lang"], SingleTranslate.ItemNo)
									)%>
									</div>
									<% if (CurrentMember != null) {%>
									<div>
										<% if (!HasGoodFlag) {%>
										<p style="margin-top:10px"><strong>Submit your own translation</strong></p>
										<p><textarea name="texta_content" cols="5" style="width: 625px; height:80px"></textarea><input type="hidden" name="hide_itemno" value="<%=SingleTranslate.ItemNo%>" /><br /><span id="span_inputerror" style="color: Red;"></span></p>
										<p><input name="" type="submit" value="Submit" class="button"></p>
										<%} else {%>
										<p align="right"><a href="/translate/translate.htm?lang=<%=Request.QueryString["lang"]%>">Get a new entry</a></p><%}%>
									</div>
									<%} else {%>
									<div class="floatl"><a href="/translate/join.htm?ReturnUrl=<%= HttpUtility.UrlEncode("/translate/translate.htm?lang=" + Request.QueryString["lang"] + "&id=" + SingleTranslate.ItemNo) %>">Join Now!</a></div>
									<div class="floatr"><a href="/translate/translate.htm?lang=<%=Request.QueryString["lang"]%>">Get a new entry</a></div>
									<%} %>
								</div>
							</div>
						</div>
					</div>
					<div class="center9001left">
						<div class="right_layerA">
							<div class="layer_contentA">
								<h4>Note:</h4>
								<div class="layer_contentA5">
									1.You should not translate the name of variables!<br>
									2.You should translate the words inside the brackets, because they will actually
									be displayed to the user.
								</div>
							</div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
				<%} else {%>
				No Item!
				<%}%>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>